<h1 id="heading1">标题1</h1> 是什么意思?

来源:百度知道 编辑:UC知道 时间:2024/05/30 00:35:47
和这个:<a href="#heading2">转到标题2</a>有什么区别呢?
id="heading1"是对该h1标题的标识,定位用的。
定位?为什么要定位,不直接用:<h1>标题</h1>
这两个又有什么区别?

<h1> 定义最大的标题

<html>

<body>

<h1>This is heading 1</h1>

<h2>This is heading 2</h2>

<h3>This is heading 3</h3>

<h4>This is heading 4</h4>

<h5>This is heading 5</h5>

<h6>This is heading 6</h6>

<p>请仅仅把标题标签用于标题文本。不要仅仅为了产生粗体文本而使用它们。请使用其它标签或 CSS 代替。</p>

</body>

</html>